home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / kernels / old_docs / bootdisk.faq next >
Encoding:
Text File  |  1994-05-29  |  2.6 KB  |  70 lines

  1. There's only one question that's *really* frequently asked, and that's
  2. "How do I make a bootdisk with drivers for XXX?"
  3.  
  4. Well..... here goes. :^)
  5.  
  6. First, you need to make a new kernel with the drivers you want. You'll have
  7. to apply a small patch first, to make the kernel wait for you to switch in
  8. the rootdisk before attempting to load it into the ramdisk. This patch can be
  9. found on ftp.cdrom.com: /pub/linux/slackware_source/bootdisk/ramdisk.c.
  10. Replace /usr/src/linux/drivers/block/ramdisk.c with this new version. Then,
  11. 'make config' and select the drivers you want. Once you've got that figured
  12. out, do 'make dep ; make clean ; make zImage' to build the new kernel.
  13.  
  14. Modify the bootflags on the kernel, so that it will load a ramdisk:
  15. rdev -R zImage 0
  16. rdev -r zImage 1440 (use 1200 if you're using a 5.25" floppy drive)
  17. rdev -v zImage -1
  18. rdev zImage /dev/fd0
  19.  
  20. OK, now we are ready to put this kernel on a disk. Make a copy of a bootkernel
  21. disk as a starting point, and then mount it with a command like this:
  22.  
  23. mount /dev/fd0 /mnt
  24.  
  25. Put the new kernel in place like this:
  26. cat zImage > /mnt/vmlinuz
  27.  
  28. And unmount the disk:
  29. umount /dev/fd0
  30.  
  31. Now the disk must be activated with LILO in order to make it self-booting.
  32. You'll need to use another copy of the kernel to do this. Put a different
  33. formatted (and expendable) disk into /dev/fd0, and do this:
  34.  
  35. rdev -r zImage 0   (this tells it NOT to use a ramdisk for this)
  36. cat zImage > /dev/fd0
  37.  
  38. At this point, reboot your machine, leaving the disk in the drive. Your
  39. machine will load the new disk, and it will ask you to insert a disk to
  40. be mounted as root and hit ENTER. At this point, take the disk out and
  41. replace it with the new bootkernel disk and hit ENTER.
  42.  
  43. You'll see some error messages on your way to the login prompt. You can
  44. ignore them. When you get a login prompt, log in as root.
  45.  
  46. Now for the magic words:
  47.  
  48. lilo
  49. sync
  50.  
  51. After typing 'lilo', you should see 'Added ramdisk' and 'Added mount' appear
  52. at the bottom of the screen. When you get another prompt, you type 'sync'.
  53. As soon as the disk stops spinning and the drive light goes out, take the disk
  54. out of the drive.
  55.  
  56. That should do it! This new disk should work as a bootkernel disk.
  57.  
  58. Also - if you already have a kernel image that you want to use, you can use
  59. an image without the ramdisk patch. You still have to do all the 'rdev's to
  60. it. If you do use an unpatched kernel, the bootkernel disk you create will not
  61. prompt for you to insert the rootdisk, but should still work fine. You'll just
  62. have to swap the rootdisk in once you see the 'Uncompressing Linux' message.
  63.  
  64. Good luck!!! :^)
  65.  
  66. ---
  67. Patrick Volkerding
  68. volkerdi@mhd1.moorhead.msus.edu
  69. volkerdi@ftp.cdrom.com
  70.